<?php
namespace Home\Model;
use Think\Model;

class ShopModel extends Model {
	    /**
    	 * [列表数据]
    	 * @Author   Axing
    	 * @DateTime 2017-09-11
    	 * @param    [array]     $arr [字段]
    	 * @return   [type]           [description]
    	 */
    	public function lists($arr) {
    		$data = $this->field($arr['field'])->where($arr['where_a'])->where($arr['where_b'])->order($arr['order'])->limit($arr['startcount'], $arr['pagecount'])->select();
    		
    		return $data;
    	}
        
        /**
         * [更新钱包金额]
         * @Author   Axing
         * @DateTime 2017-09-11
         * @param    [int]       $shopid [厂商id]
         * @param    [fload]     $price  [结算金额]
         * @return   [type]     [description]
         */
        public function update_money($shopid, $price) {
            $res = $this->where('shopid = ' . $shopid)->setInc('money', $price);
            
            return $res;
        }
}